import { Router } from 'vue-router';

export function beforeEach (router: Router) {
  router.beforeEach((to, from, next) => {
    window.document.title = typeof to.meta.title === 'string' ? to.meta.title : ''
    next()
  })
}